package org.zoffy.exception;


import org.zoffy.commons.StatusCode;

public class BusinessException extends RuntimeException {
    private int code;
    public BusinessException(int code, String message){
        super(message);
        this.code=code;
    }
    public BusinessException(StatusCode statusCode) {
        super(statusCode.getMsg());
        this.code = statusCode.getCode();
    }

    public BusinessException(StatusCode statusCode, String message) {
        super(message);
        this.code = statusCode.getCode();
    }

    public int getCode() {
        return code;
    }

}
